﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TalentPools.Model;
using TalentPools.DAL;

namespace TalentPools.BLL
{
    public class TrainingManager
    {
        public bool DeleteTraining(int trainingId)
        {
            return new TrainingService().DeleteTraining(trainingId);
        }
        public bool DeleteTraining1(int resumeId)
        {
            return new TrainingService().DeleteTraining1(resumeId);
        }
        /// <summary>
        /// 根据简历Id查询培训信息
        /// </summary>
        /// <param name="resumeId"></param>
        /// <returns></returns>
        public List<training> GetTrains(int resumeId)
        {
            return new TalentPools.DAL.TrainingService().GetTrains(resumeId);
        }
        public training GetTrain(int resumeId, int trainingId)
        {
            List<training> list=new TalentPools.DAL.TrainingService().GetTrain(resumeId,trainingId);
            if (list.Count==1)
            {
                return list[0];
            }
            else
            {
                return null;
            }
        }
    }
}
